Sql Inner Join And Sql Aggregate Functions With A Business Problem